﻿using System;

namespace Synology.DS.Interface.Abstract
{
    #region Events interface

    public delegate void NewTorrentEventHandler(object sender, NewTorrentEventArgs args);

    public class NewTorrentEventArgs : EventArgs
    {
        public NewTorrentEventArgs(string filePath)
        {
            FilePath = filePath;
        }

        public string FilePath { get; private set; }
    }

    #endregion


    public interface ITorrentsWatcher
    {
        /// <summary>
        /// Start watching folder for new torrents
        /// </summary>
        void Start();

        /// <summary>
        /// Stops watching folder for new torrents
        /// </summary>
        void Stop();

        /// <summary>
        /// occurs when new torrent is available
        /// </summary>
        event NewTorrentEventHandler NewTorrent;
    }
}
